Optimal. Leaf size=362 \[ \frac{(a+b x)^{m+1} (c+d x)^{-m-2} \left (a^2 d^2 f h \left (m^2+5 m+6\right )-a b d (m+3) (2 c f h (m+1)+d (e h+f g))+b^2 \left (c^2 f h \left (m^2+3 m+2\right )+c d (m+1) (e h+f g)+2 d^2 e g\right )\right )}{b d^2 (m+2) (m+3) (b c-a d)^2}+\frac{(a+b x)^{m+1} (c+d x)^{-m-1} \left (a^2 d^2 f h \left (m^2+5 m+6\right )-a b d (m+3) (2 c f h (m+1)+d (e h+f g))+b^2 \left (c^2 f h \left (m^2+3 m+2\right )+c d (m+1) (e h+f g)+2 d^2 e g\right )\right )}{d^2 (m+1) (m+2) (m+3) (b c-a d)^3}+\frac{(a+b x)^{m+1} (c+d x)^{-m-3} \left (-d f h (m+3) x (b c-a d)+a c d f h (m+3)+b \left (c^2 (-f) h (m+2)-c d (e h+f g)+d^2 e g\right )\right )}{b d^2 (m+3) (b c-a d)} \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.988157, antiderivative size = 362, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.103 \[ \frac{(a+b x)^{m+1} (c+d x)^{-m-2} \left (a^2 d^2 f h \left (m^2+5 m+6\right )-a b d (m+3) (2 c f h (m+1)+d (e h+f g))+b^2 \left (c^2 f h \left (m^2+3 m+2\right )+c d (m+1) (e h+f g)+2 d^2 e g\right )\right )}{b d^2 (m+2) (m+3) (b c-a d)^2}+\frac{(a+b x)^{m+1} (c+d x)^{-m-1} \left (a^2 d^2 f h \left (m^2+5 m+6\right )-a b d (m+3) (2 c f h (m+1)+d (e h+f g))+b^2 \left (c^2 f h \left (m^2+3 m+2\right )+c d (m+1) (e h+f g)+2 d^2 e g\right )\right )}{d^2 (m+1) (m+2) (m+3) (b c-a d)^3}+\frac{(a+b x)^{m+1} (c+d x)^{-m-3} \left (-d f h (m+3) x (b c-a d)+a c d f h (m+3)+b \left (c^2 (-f) h (m+2)-c d (e h+f g)+d^2 e g\right )\right )}{b d^2 (m+3) (b c-a d)} \]
Antiderivative was successfully verified.
[In] Int[(a + b*x)^m*(c + d*x)^(-4 - m)*(e + f*x)*(g + h*x),x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [A] time = 127.151, size = 337, normalized size = 0.93 \[ - \frac{\left (a + b x\right )^{m + 1} \left (c + d x\right )^{- m - 1} \left (b^{2} c^{2} f h \left (m + 1\right ) \left (m + 2\right ) + b c d \left (m + 1\right ) \left (- 2 a f h \left (m + 3\right ) + b \left (e h + f g\right )\right ) + d^{2} \left (a^{2} f h \left (m + 2\right ) \left (m + 3\right ) - a b \left (m + 3\right ) \left (e h + f g\right ) + 2 b^{2} e g\right )\right )}{d^{2} \left (m + 1\right ) \left (m + 2\right ) \left (m + 3\right ) \left (a d - b c\right )^{3}} + \frac{\left (a + b x\right )^{m + 1} \left (c + d x\right )^{- m - 3} \left (b c^{2} f h \left (m + 2\right ) - b d^{2} e g + c d \left (- a f h \left (m + 3\right ) + b \left (e h + f g\right )\right ) - d f h x \left (m + 3\right ) \left (a d - b c\right )\right )}{b d^{2} \left (m + 3\right ) \left (a d - b c\right )} + \frac{\left (a + b x\right )^{m + 1} \left (c + d x\right )^{- m - 2} \left (b^{2} c^{2} f h \left (m + 1\right ) \left (m + 2\right ) + b c d \left (m + 1\right ) \left (- 2 a f h \left (m + 3\right ) + b \left (e h + f g\right )\right ) + d^{2} \left (a^{2} f h \left (m + 2\right ) \left (m + 3\right ) - a b \left (m + 3\right ) \left (e h + f g\right ) + 2 b^{2} e g\right )\right )}{b d^{2} \left (m + 2\right ) \left (m + 3\right ) \left (a d - b c\right )^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate((b*x+a)**m*(d*x+c)**(-4-m)*(f*x+e)*(h*x+g),x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 1.42076, size = 315, normalized size = 0.87 \[ \frac{(a+b x)^{m+1} (c+d x)^{-m-3} \left (a^2 \left (2 c^2 f h+c d (e h (m+1)+f g (m+1)+2 f h (m+3) x)+d^2 (e (m+1) (g (m+2)+h (m+3) x)+f (m+3) x (g (m+1)+h (m+2) x))\right )-a b \left (c^2 (e h (m+3)+f g (m+3)+2 f h (m+1) x)+2 c d \left (e \left (g \left (m^2+4 m+3\right )+h \left (m^2+4 m+5\right ) x\right )+f x \left (g \left (m^2+4 m+5\right )+h \left (m^2+4 m+3\right ) x\right )\right )+d^2 x (2 e g (m+1)+e h (m+3) x+f g (m+3) x)\right )+b^2 \left (c^2 (e (m+3) (g (m+2)+h (m+1) x)+f (m+1) x (g (m+3)+h (m+2) x))+c d x (2 e g (m+3)+e h (m+1) x+f g (m+1) x)+2 d^2 e g x^2\right )\right )}{(m+1) (m+2) (m+3) (b c-a d)^3} \]
Antiderivative was successfully verified.
[In] Integrate[(a + b*x)^m*(c + d*x)^(-4 - m)*(e + f*x)*(g + h*x),x]
[Out]
_______________________________________________________________________________________
Maple [B] time = 0.012, size = 894, normalized size = 2.5 \[ -{\frac{ \left ( bx+a \right ) ^{1+m} \left ( dx+c \right ) ^{-3-m} \left ({a}^{2}{d}^{2}fh{m}^{2}{x}^{2}-2\,abcdfh{m}^{2}{x}^{2}+{b}^{2}{c}^{2}fh{m}^{2}{x}^{2}+{a}^{2}{d}^{2}eh{m}^{2}x+{a}^{2}{d}^{2}fg{m}^{2}x+5\,{a}^{2}{d}^{2}fhm{x}^{2}-2\,abcdeh{m}^{2}x-2\,abcdfg{m}^{2}x-8\,abcdfhm{x}^{2}-ab{d}^{2}ehm{x}^{2}-ab{d}^{2}fgm{x}^{2}+{b}^{2}{c}^{2}eh{m}^{2}x+{b}^{2}{c}^{2}fg{m}^{2}x+3\,{b}^{2}{c}^{2}fhm{x}^{2}+{b}^{2}cdehm{x}^{2}+{b}^{2}cdfgm{x}^{2}+2\,{a}^{2}cdfhmx+{a}^{2}{d}^{2}eg{m}^{2}+4\,{a}^{2}{d}^{2}ehmx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}^{3}m+6\,{a}^{3}{d}^{3}-18\,{a}^{2}bc{d}^{2}+18\,a{b}^{2}{c}^{2}d-6\,{b}^{3}{c}^{3}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int((b*x+a)^m*(d*x+c)^(-4-m)*(f*x+e)*(h*x+g),x)
[Out]
_______________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \[ \int{\left (f x + e\right )}{\left (h x + g\right )}{\left (b x + a\right )}^{m}{\left (d x + c\right )}^{-m - 4}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((f*x + e)*(h*x + g)*(b*x + a)^m*(d*x + c)^(-m - 4),x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.2607, size = 2240, normalized size = 6.19 \[ \text{result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((f*x + e)*(h*x + g)*(b*x + a)^m*(d*x + c)^(-m - 4),x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((b*x+a)**m*(d*x+c)**(-4-m)*(f*x+e)*(h*x+g),x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [F] time = 0., size = 0, normalized size = 0. \[ \int{\left (f x + e\right )}{\left (h x + g\right )}{\left (b x + a\right )}^{m}{\left (d x + c\right )}^{-m - 4}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((f*x + e)*(h*x + g)*(b*x + a)^m*(d*x + c)^(-m - 4),x, algorithm="giac")
[Out]